[670] Added hover style for table widget - #161
Conversation
📝 WalkthroughWalkthroughThis change updates the table widget's UI by introducing a new Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant TableRow (HTML)
participant SCSS
User->>TableRow (HTML): Hover or focus on .sf-table-row
TableRow (HTML)->>SCSS: Triggers hover/focus state
SCSS-->>TableRow (HTML): Applies scale, z-index, color transitions
SCSS-->>TableRow (HTML): Reveals and animates .background-circle
User-->>TableRow (HTML): Moves mouse away or blurs
TableRow (HTML)->>SCSS: Removes hover/focus state
SCSS-->>TableRow (HTML): Reverts styles and hides .background-circle
Possibly related PRs
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (6)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (4)
website/modules/asset/ui/src/scss/_table-widget.scss (4)
38-42: Improve animation performance by specifyingwill-changeand targeted transitions
Transitioningallis expensive; consider limiting transitions totransform,border-color, and color properties. Additionally, hint the browser for animations by addingwill-change: transform..sf-table-row { - @include transition(all, 0.5s); + @include transition(transform 0.5s, border-color 0.5s, color 0.5s); + /* Hint browser to optimize for transform changes */ + will-change: transform; transform: scale3d(1, 1, 1); }
48-52: Prevent decorative circle from intercepting pointer events
Addpointer-events: noneto the.background-circleto ensure it doesn’t block row interactions..background-circle { - display: none; + display: none; + pointer-events: none; @include decorative-background-circle($gray-500, 25%, 130%, 100%, -100% -60% auto auto, -10); }
53-76: DRY repeated hover styles into a mixin
The hover effects under default and medium breakpoints are nearly identical. Extract shared rules (transform, z-index, border-color, text color, background-circle sizing) into a reusable mixin for maintainability.// Define once @mixin table-row-hover-effect { transform: scale3d(1.03, 1.03, 1); z-index: 10; border-color: black; .sf-table-title, .sf-table-cell-title { color: $gray-100; } .sf-table-cell-description, .sf-table-link a { color: $gray-200; } .background-circle { display: block; width: 150em; height: 50em; transform: translate3d(-5%, -10%, 0); } } // Then include: .sf-table-row { &:hover { @include table-row-hover-effect; } @include breakpoint-medium { &:hover { @include table-row-hover-effect; } } }Also applies to: 91-111
87-89: Consolidate decorative mixin usage
You reapplydecorative-background-circleunder the medium breakpoint. Consider defining it once at the root.sf-table-row .background-circleand overriding only on hover, to avoid duplication..sf-table-row { .background-circle { - @include decorative-background-circle($gray-500, 25%, 130%, 100%, -100% -60% auto auto, -10); } @include breakpoint-medium { .background-circle { - @include decorative-background-circle($gray-500, 25%, 130%, 100%, -100% -60% auto auto, -10); } } }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
website/modules/asset/ui/src/scss/_table-widget.scss(6 hunks)website/modules/table-widget/views/widget.html(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (6)
- GitHub Check: e2e-tests
- GitHub Check: unit-tests
- GitHub Check: lint
- GitHub Check: security-scan
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: Analyze (actions)
|



Added hover style for table widget